home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-03-23 | 24.2 KB | 809 lines | [TEXT/GEOL] |
- Item 1503284 21-March-90 12:34PST
-
- From: V0754 Troll Tech, Tom Storli,VAR
-
- To: CPLUS.DEV$ C++ Interest List--Developers
-
- Sub: C++ Help Plea
-
- HELP!
-
- Can anyone tell me what is going on here? Whenever I include the function
- "CCharGrid::IViewTemp()" listed below, CFront works fine, but the C compiler
- crashes. It does'nt matter whether the function contains any lines of code or
- not. If the function is commented out, the entire file compiles correctly.
- The function is listed at the end of this document, just before the listing of
- the C compiler output.
-
- This is the output from the C Compiler after CFront has been run.
- If the above function (CCharGrid::IViewTemp()) is **not** commented out
- the C compiler makes it all the way to "# Total code size = 4222" and then
- crashes.
-
- This code fragment is a personal use only copy of some of the routines in the
- THINK™ Object Class Library. I have modified these to run under MPW. This
- fragment is not for distribution, its sole purpose is to provide reference for
- the problem I need help with.
-
-
- #include <Windows.h>
- #include <Memory.h>
-
- #defineNOTHING 0 /* Useful flag */
- #defineMax(x, y) ((x) > (y) ? (x) : (y))
- #define topLeft(r) (((Point *) &(r))[0])
-
- typedeflong**LongHandle;
- typedefvoid (*VoidFunc)(...); /* Ptr to a function returning void */
- typedefBoolean (*BooleanFunc)(...);/* Ptr to a Boolean function*/
-
-
-
-
- class CTask : HandleObject { /* Class Declaration*/
-
- protected:
-
- short nameIndex; /* Index for name in string list*/
-
- CTask(short aNameIndex) { nameIndex = aNameIndex; }
-
- public:
-
- short GetNameIndex(void) { return(nameIndex); }
-
- virtual voidDo(void) {}
- virtual voidUndo(void) {}
- virtual voidRedo(void) { Undo(); }
- };
-
-
-
-
- class CMouseTask : public CTask { /* Class Declaration*/
-
- public:
- /** Contruction/Destruction **/
- CMouseTask(short aNameIndex)
- : CTask(aNameIndex) {}
- /** Mouse Tracking **/
- virtual voidBeginTracking(Point *startPt) {}
- virtual voidKeepTracking(Point *currPt, Point *prevPt, Point *startPt) {}
- virtual voidEndTracking(Point *currPt, Point *prevPt, Point *startPt) {}
- };
-
-
-
-
-
- extern class CBureaucrat *gGopher; /* First in line to get commands*/
-
- class CBureaucrat {/* Class Declaration*/
-
- protected:
- /** Instance Variables **/
- CBureaucrat *itsSupervisor; /* Its boss in the command chain*/
-
- CBureaucrat(CBureaucrat *aSupervisor) { itsSupervisor = aSupervisor; }
- virtual ~CBureaucrat(void) { if (gGopher == this) gGopher = itsSupervisor;
-
- public:
- /** Accessing **/
- CBureaucrat *GetSupervisor(void) { return(itsSupervisor); }
-
- /** Commanding **/
- virtual voidNotify(CTask *theTask) { itsSupervisor->Notify(theTask); }
- virtual voidDoKeyDown(char theChar, Byte keyCode, EventRecord *macEvent) {
- itsSupervisor->DoKeyDown(theChar, keyCode, macEvent);
- }
- virtual voidDoAutoKey(char theChar, Byte keyCode, EventRecord *macEvent) {
- itsSupervisor->DoAutoKey(theChar, keyCode, macEvent);
- }
- virtual voidDoKeyUp(char theChar, Byte keyCode, EventRecord *macEvent) {
- itsSupervisor->DoKeyUp(theChar, keyCode, macEvent);
- }
- virtual voidDoCommand(long theCommand) {
- itsSupervisor->DoCommand(theCommand); }
- virtual voidDawdle(long *maxSleep) {}
- virtual voidUpdateMenus(void) {
- if (itsSupervisor) itsSupervisor->UpdateMenus();
- }
- };
-
-
-
- class CCollection {/* Class Declaration*/
-
- protected:
-
- longnumItems; /* Number of items in collection*/
-
- CCollection(void) { numItems = 0L; };
-
- public:
- /** Instance Methods **/
- longGetNumItems(void) { return(numItems); };/* Retrieve size of collection
- */
- Boolean IsEmpty(void) { return(numItems == 0L); }; /* Is the collection
- empty? */
- };
-
-
-
-
-
- #defineSLOT_SIZE 4 /* Byte size of a slot. A slot */ /* holds
- a handle to an object. */
- #defineBAD_INDEX -1L /* Flag indicating a failed search */
-
- class CCluster : public CCollection { /* Class Declaration*/
-
- protected:
-
- short blockSize; /* Number of slots to allocate when */
- /* more space is needed*/
- short slots; /* Total number of slots allocated */
- LongHandle items; /* Items in the cluster */
-
- public:
-
- CCluster(void); /* Initialization */
- virtual ~CCluster(void) { DisposHandle((Handle)items); }/* Dispose of a
- Cluster*/
-
- virtual voidDisposeAll(void); /* Dispose of Cluster and all items */
- virtual voidDisposeItems(void); /* Dispose of all items in Cluster */
-
- /* Specify a new blockSize */
- virtual voidSetBlockSize(short aBlockSize) { blockSize = aBlockSize; }
- /* Add an object to the cluster */
- virtual voidAdd(long *theObject);
- /* Remove an object */
- virtual voidRemove(long *theObject);
- /* Test for inclusion of an object */
- virtual Boolean Includes(long *theObject) { return(Offset(theObject) !=
- BAD_INDEX); }
- virtual voidDoForEach(VoidFunc theFunc) {
- register long i;
-
- for (i = 0; i < numItems; i++) // Call a function for each item
- (*theFunc)((*items)[i]);
- }
- virtual voidDoForEach1(VoidFunc theFunc, long param){
- register long i;
-
- for (i = 0; i < numItems; i++) // Call a function for each item
- (*theFunc)((*items)[i],param);
- }
- virtual voidMoreSlots(void) { /* Allocate additional slots*/
- slots += blockSize;
- SetHandleSize((Handle)items, (long)(slots * SLOT_SIZE));
- }
- virtual long* FindItem(BooleanFunc);
- virtual long* FindItem1(BooleanFunc, long param);
- /* Find offset of object in cluster */
- virtual longOffset(long *theObject);
- };
-
-
-
-
- class CList : public CCluster {/* Class Declaration*/
-
- public:
- /** Instance Methods **/
- virtual voidRemove(long *theObject);
- virtual voidAppend(long *theObject) { CCluster::Add(theObject); }
- virtual voidPrepend(long *theObject);
- virtual voidInsertAfter(long *theObject, long *afterObject);
- virtual voidInsertAt(long *theObject, long index);
-
- virtual voidBringFront(long *theObject);
- virtual voidSendBack(long *theObject);
- virtual voidMoveUp(long *theObject);
- virtual voidMoveDown(long *theObject);
- virtual voidMoveToIndex(long *theObject, long index);
-
- virtual long* FirstItem(void) { return(NthItem(1)); }
- virtual long* LastItem(void) { return(NthItem(numItems)); }
- virtual long* NthItem(long n);
- virtual longFindIndex(long *theObject) { return(Offset(theObject) + 1); }
- virtual long* FirstSuccess(BooleanFunc testFunc) {
- return(CCluster::FindItem(testFunc)); }
- virtual long* FirstSuccess1(BooleanFunc testFunc, long param) {
- return(CCluster::FindItem1(testFunc, param)); }
- virtual long* LastSuccess(BooleanFunc testFunc);
- virtual long* LastSuccess1(BooleanFunc testFunc, long param);
- };
-
-
-
-
-
- class CView : public CBureaucrat { /* Class Declaration*/
-
- protected:
-
- CView(CView *anEnclosure, CBureaucrat *aSupervisor);
- CView(ResType rType, short resID, CView *anEnclosure, CBureaucrat
- *aSupervisor);
- ~CView(void);
- virtual voidAdjustScrollMax(void) {}// MPW has no 'member' function (see
- Scrollbar)
-
- public:
- /** Instance Variables **/
- GrafPtr macPort;/* Mac drawing port for the image */
- CView *itsEnclosure; /* Enclosing view */
- CList *itsSubviews; /* Views within this view */
- Boolean visible;/* Is the view visible? */
- Boolean active; /* Is the view active? */
- Boolean wantsClicks;/* Does view handle mouse clicks? */
-
- /** Instance Methods **/
- /** Construction/Destruction **/
-
- virtual voidIViewTemp(Ptr *viewData);
-
- /** Accessing **/
- virtual Boolean IsVisible(void) { return(visible); }
- virtual Boolean IsActive(void);
- virtual Boolean ReallyVisible(void) {
- if (visible)
- return(itsEnclosure->ReallyVisible());
- else
- return(false);
- }
- virtual GrafPtr GetMacPort(void) { return(macPort); };
- virtual voidGetOrigin(long *theHOrigin, long *theVOrigin) { *theHOrigin =
- *theVOrigin = 0L; }
- virtual voidGetFrame(Rect *theFrame) {}
- virtual voidGetInterior(Rect *theInterior) { GetFrame(theInterior); }
- virtual voidGetAperture(Rect *theAperture) {}
- virtual Boolean Contains(Point thePoint) {}
- virtual voidSetWantsClicks(Boolean aWantsClicks) { wantsClicks =
- aWantsClicks; }
-
- /** Appearance **/
- virtual voidShow(void) { visible = true; }
- virtual voidHide(void) {
- visible = false; if (gGopher == this) gGopher = itsSupervisor;
- }
- virtual voidActivate(void);
- virtual voidDeactivate(void);
-
- /** Mouse **/
- virtual voidDispatchClick(EventRecord *macEvent);
- virtual voidDoClick(Point hitPt, short modifierKeys, long when) {}
- virtual Boolean HitSamePart(Point pointA, Point pointB) { return(true); }
- virtual voidDoMouseUp(EventRecord *macEvent) {}
- virtual voidTrackMouse(CMouseTask *theTask, Point startPt, Rect *pinRect);
-
- /** Cursor **/
- voidDispatchCursor(Point where, RgnHandle mouseRgn);
- voidAdjustCursor(Point where, RgnHandle mouseRgn) { SetCursor(&(qd.arrow));
- }
-
- /** Subview Management **/
- voidAddSubview(CView *theSubview);
- voidRemoveSubview(CView *theSubview) {
- itsSubviews->Remove((long*)theSubview); }
- CView* FindSubview(Point hitPt);
- voidSubpaneLocation(short hEncl, short vEncl,
- long *hLocation, long *vLocation);
- virtual voidPrepare(void) {}
- virtual voidFrameToGlobalR(Rect *theRect) {}
- };
-
-
- typedef struct { /* View template*/
- short visible;
- short active;
- short wantsClicks;
- } ViewTemp, *ViewTempP;
-
-
- void CountClicks(CView *hitView, EventRecord *macEvent);
-
-
-
-
-
- class CEnvironment { /* Class Declaration*/
-
- public:
- /** Instance Methods **/
- virtual voidRestore(void) { PenNormal(); };
- };
-
-
-
-
-
- /** How pane changes size when the size of its enclosure changes **/
-
- typedef enum SizingOption {
- sizFIXEDLEFT, /* Fixed length, anchored to left */
- sizFIXEDRIGHT, /* Fixed length, anchored to right */
- sizFIXEDTOP,/* Fixed length, anchored to top */
- sizFIXEDBOTTOM, /* Fixed length, anchored to bottom */
- sizFIXEDSTICKY, /* Fixed length, sticks to coords */
- /* of its enclosure */
- sizELASTIC /* Variable length, always a fixed */
- /* amount smaller than enclosure */
- } SizingOption;
-
- typedef enum ClipOption{
- clipAPERTURE,
- clipFRAME,
- clipPAGE
- } ClipOption;
-
-
- class CPane : public CView { /* Class Declaration*/
-
- friend void Pane_AdjustToEnclosure(CPane *thePane, Rect *delta);
- friend void Pane_CalcAperture(CPane *thePane);
- friend void Pane_Draw( CPane *thePane, Rect *area);
- friend void Pane_EnclosureScrolled(CPane *thePane, Point *offset);
-
- protected:
-
- short width; /* Horizontal size in pixels*/
- short height; /* Vertical size in pixels */
- short hEncl; /* Horizontal location in enclosure */
- short vEncl; /* Vertical location in enclosure */
- SizingOptionhSizing;/* Horizontal sizing option */
- SizingOptionvSizing;/* Vertical sizing option */
- Boolean autoRefresh;/* Refresh all after a resize? */
- Rectframe; /* Area for displaying the Pane */
- /* which defines Frame coords */
- Rectaperture; /* Active drawing area of the Pane */
- longhOrigin;/* Window left in Frame coords */
- longvOrigin;/* Window top in Frame coords */
- CEnvironment*itsEnvironment;/* Drawing environment */
- ClipOption printClip; /* Clipping option when printing*/
- Boolean printing; /* Is printing in progress? */
-
- voidGetOrigin(long *theHOrigin, long *theVOrigin) {
- *theHOrigin = hOrigin; *theVOrigin = vOrigin;
- };
- voidAdjustToEnclosure(Rect *deltaEncl);
- voidAdjustHoriz(Rect *deltaEncl, Rect *delta, short *offset,
- Boolean *moved, Boolean *sized);
- voidAdjustVert(Rect *deltaEncl, Rect *delta, short *offset,
- Boolean *moved, Boolean *sized);
- voidEnclosureScrolled(short hOffset, short vOffset);
- voidCalcAperture(void);
-
- public:
- /** Construct/Destruction **/
- CPane(CView *anEnclosure, CBureaucrat *aSupervisor,
- short aWidth, short aHeight, short aHEncl, short aVEncl,
- SizingOption aHSizing, SizingOption aVSizing);
- CPane(ResType rType, short resID, CView *anEnclosure, CBureaucrat
- *aSupervisor)
- : CView(rType, resID, anEnclosure, aSupervisor) {}
- ~CPane(void);
-
- virtual voidIViewTemp(Ptr *viewData);
- virtual voidIPaneX(void);
-
- /** Accessing **/
- virtual voidSetFrameOrigin(short fLeft, short fTop);
- virtual voidGetFrame(Rect *theFrame) { *theFrame = frame; };
- virtual voidGetLengths(short *theWidth, short *theHeight);
- virtual voidGetAperture(Rect *theAperture) { *theAperture = aperture; };
- virtual Boolean Contains(Point thePoint) {
- WindToFrame(&thePoint); /* Convert to Frame coordinates */
- return(PtInRect(thePoint, &aperture)); /* Is point inside aperture?*/
- };
- virtual Boolean ReallyVisible(void);
- virtual voidGetPixelExtent(long *hExtent, long *vExtent);
- virtual voidSetPrintClip(ClipOption aPrintClip) { printClip = aPrintClip; };
-
- /** Display **/
- virtual voidShow(void) {
- if (!visible) {
- CView::Show();
- Refresh();
- }
- };
- virtual voidHide(void) {
- if (visible) {
- Refresh();
- CView::Hide();
- }
- };
-
- /** Size and Location **/
- virtual voidPlace(short hEncl, short vEncl, Boolean redraw);
- virtual voidOffset(short hOffset, short vOffset, Boolean redraw);
- virtual voidChangeSize(Rect *delta, Boolean redraw);
-
- /** Adapting **/
- virtual voidFitToEnclosure(Boolean horizFit, Boolean vertFit);
- virtual voidFitToEnclFrame(Boolean horizFit, Boolean vertFit);
- virtual voidCenterWithinEnclosure(Boolean horizCenter, Boolean vertCenter);
-
- /** Drawing **/
- virtual voidDraw(Rect *area) {};
- virtual voidDrawAll(Rect *area);
- virtual voidRefresh(void);
- virtual voidRefreshRect(Rect *area);
-
- /** Printing **/
-
- virtual voidAboutToPrint(short *firstPage, short *lastPage) { printing =
- true; };
- virtual voidPrintPage(short pageNum, short pageWidth, short pageHeight);
- virtual voidDonePrinting(void) { printing = false; };
- virtual voidPrepareToPrint(void);
-
- /** Calibrating **/
- virtual voidPrepare(void);
- virtual voidRestoreEnvironment(void) { if (itsEnvironment)
- itsEnvironment->Restore(); };
- virtual voidCalcFrame(void);
- virtual voidResizeFrame(Rect *delta);
-
- /** Coordinate Transforms **/
- virtual voidWindToFrame(Point *thePoint) {
- thePoint->h += (short) hOrigin;
- thePoint->v += (short) vOrigin;
- };
- virtual voidWindToFrameR(Rect *theRect) { OffsetRect(theRect, (short)
- hOrigin, (short) vOrigin); };
- virtual voidFrameToWind(Point *thePoint) {
- thePoint->h -= (short) hOrigin;
- thePoint->v -= (short) vOrigin;
- };
- virtual voidFrameToWindR(Rect *theRect) {
- OffsetRect(theRect, -(short) hOrigin, -(short) vOrigin);
- };
- virtual voidEnclToFrame(Point *thePoint) {
- longenclHOrigin;
- longenclVOrigin;
-
- itsEnclosure->GetOrigin(&enclHOrigin, &enclVOrigin);
- thePoint->h += (short) (hOrigin - enclHOrigin);
- thePoint->v += (short) (vOrigin - enclVOrigin);
- };
- virtual voidEnclToFrameR(Rect *theRect) {
- longenclHOrigin;
- longenclVOrigin;
-
- itsEnclosure->GetOrigin(&enclHOrigin, &enclVOrigin);
- OffsetRect(theRect, (short) (hOrigin - enclHOrigin),
- (short) (vOrigin - enclVOrigin));
- };
- virtual voidFrameToEncl(Point *thePoint) {
- longenclHOrigin;
- longenclVOrigin;
-
- itsEnclosure->GetOrigin(&enclHOrigin, &enclVOrigin);
- thePoint->h += (short)(enclHOrigin - hOrigin);
- thePoint->v += (short)(enclVOrigin - vOrigin);
- };
- virtual voidFrameToEnclR(Rect *theRect) {
- longenclHOrigin;
- longenclVOrigin;
-
- itsEnclosure->GetOrigin(&enclHOrigin, &enclVOrigin);
- OffsetRect(theRect, (short)(enclHOrigin - hOrigin),(short)(enclVOrigin -
- vOrigin));
- };
- virtual voidFrameToGlobalR(Rect *theRect) {
- Point offset;
-
- offset = topLeft((**((WindowPeek)macPort)->contRgn).rgnBBox);
- OffsetRect(theRect, offset.h - (short)hOrigin, offset.v -
- (short)vOrigin);
- };
- };
-
-
- typedef struct { /* Pane template*/
- short width;
- short height;
- short hEncl;
- short vEncl;
- short hSizing;
- short vSizing;
- short autoRefresh;
- short printClip;
- } PaneTemp, *PaneTempP;
-
- /* Functions passed as arguments to list methods */
-
- voidPane_Draw(CPane *thePane, Rect *area);
- voidPane_AdjustToEnclosure(CPane *thePane, Rect *delta);
-
-
-
-
-
- class CPanorama : public CPane { /* Class Declaration*/
-
- protected:
-
- Rectbounds; /* Bounds defining Pane coordinates */
- short hScale; /* Pixels per horizontal unit */
- short vScale; /* Pixels per vertical unit */
- Point position; /* Location of frame in Panorama*/
- Point savePosition; /* Save for later restoration */
- class CScrollPane *itsScrollPane; /* Scroll pane for this Panorama*/
-
- voidGetFramePosition(long *theHPos, long *theVPos) {
- *theHPos = position.h - bounds.left;
- *theVPos = position.v - bounds.top;
- };
-
- friend class CScrollPane;
-
- public:
- /** Contruction/Destruction **/
- CPanorama(CView *anEnclosure, CBureaucrat *aSupervisor,
- short aWidth, short aHeight,
- short aHEncl, short aVEncl,
- SizingOption aHSizing, SizingOption aVSizing);
- CPanorama(ResType rType, short resID, CView *anEnclosure, CBureaucrat
- *aSupervisor)
- : CPane(rType, resID, anEnclosure, aSupervisor) {}
-
- voidIViewTemp(Ptr *viewData);
-
- /** Accessing **/
- virtual voidGetExtent(long *theHExtent, long *theVExtent) {
- *theHExtent = bounds.right - bounds.left;
- *theVExtent = bounds.bottom - bounds.top;
- };
- virtual voidGetFrameSpan(short *theHSpan, short *theVSpan) {
- *theHSpan = width / hScale; /* We get the number of complete */
- *theVSpan = height / vScale;/* units spanned by the frame */
- };
- virtual voidSetBounds(Rect *aBounds);
- virtual voidGetBounds(Rect *theBounds) { *theBounds = bounds; };
- virtual voidSetPosition(Point aPosition);
- virtual voidGetPosition(Point *thePosition) { *thePosition = position; };
- virtual voidSetScales(short aHScale, short aVScale);
- virtual voidGetScales(short *theHScale, short *theVScale) {
- *theHScale = hScale;/* Return copies of instance vars */
- *theVScale = vScale;
- };
- virtual voidSetScrollPane(struct CScrollPane *aScrollPane) { itsScrollPane =
- aScrollPane; };
-
- virtual voidGetHomePosition(Point *theHomePos) { *theHomePos =
- topLeft(bounds); };
- virtual voidGetPixelExtent(long *hExtent, long *vExtent) {
- *hExtent = (bounds.right - bounds.left) * hScale;
- *vExtent = (bounds.bottom - bounds.top) * vScale;
- };
-
- /** Calibrating **/
- virtual voidResizeFrame(Rect *delta);
-
- /** Scrolling **/
- virtual voidScroll(short hDelta, short vDelta, Boolean redraw);
- virtual voidScrollTo(Point aPosition, Boolean redraw);
- virtual voidScrollToSelection(void) {};
- virtual Boolean AutoScroll(Point mouseLoc);
-
- /** Printing **/
- virtual voidAboutToPrint(short *firstPage, short *lastPage);
- virtual voidPrintPage(short pageNum, short pageWidth, short pageHeight);
- virtual voidDonePrinting(void);
- };
-
-
- typedef struct { /* Panorama template*/
- Rectbounds;
- short hScale;
- short vScale;
- Point position;
- } PanoramaTemp, *PanoramaTempP;
-
-
-
-
-
- typedef enum {
- hiliteOFF,
- hiliteON,
- hiliteDYNAMIC
- } HiliteState;
-
- class CSelector : public CPanorama { /* Class Declaration*/
-
- protected:
- /** Instance Variables **/
- short numItems; /* Number of items to choose from */
- short selection; /* Currently selected item */
- short commandBase;/* Base value of selection command */
-
- public:
- /** Instance Methods **/
- CSelector(CView *anEnclosure, CBureaucrat *aSupervisor,
- short aWidth, short aHeight,
- short aHEncl, short aVEncl,
- SizingOption aHSizing, SizingOption aVSizing,
- short aNumItems, short aSelection,
- short aCommandBase);
-
- CSelector(ResType rType, short resID, CView *anEnclosure, CBureaucrat
- *aSupervisor)
- : CPanorama(rType,resID,anEnclosure,aSupervisor) {}
-
- voidIViewTemp(Ptr *viewData);
-
- voidDoClick(Point hitPt, short modifierKeys, long when);
- Boolean HitSamePart(Point pointA, Point pointB);
-
- virtual voidChangeSelection(short aSelection);
- virtual short GetSelection(void) { return(selection); }
- virtual voidSetCommandBase(short aCommandBase) { commandBase = aCommandBase;
- }
- virtual short GetCommandBase(void) { return(commandBase); }
- virtual voidHiliteItem(short theItem, HiliteState state) {}
- virtual short FindItem(Point hitPt) { return(NOTHING); }
- virtual voidDoDoubleClick(void) {}
- };
-
- typedef struct { /* Resource template for a */
- short numItems; /* Selector View */
- short selection;
- short commandBase;
- } SelectorTemp, *SelectorTempP;
-
-
-
-
- class CGridSelector : public CSelector { /* Class Declaration*/
-
- protected:
- /** Instance Variables **/
- short rows;
- short columns;
- short boxWidth;
- short boxHeight;
- Boolean gridOn;
-
- public:
- /** Instance Methods **/
- CGridSelector(CView *anEnclosure, CBureaucrat *aSupervisor,
- short aHEncl, short aVEncl,
- SizingOption aHSizing, SizingOption aVSizing,
- short aSelection, short aCommandBase,
- short aRows, short aColumns,
- short aBoxWidth, short aBoxHeight);
- CGridSelector(ResType rType, short resID, CView *anEnclosure, CBureaucrat
- *aSupervisor)
- : CSelector(rType,resID,anEnclosure,aSupervisor) {}
-
- voidIViewTemp(Ptr *viewData);
-
- voidDraw(Rect *area);
- voidHiliteItem(short theItem, HiliteState state);
- short FindItem(Point hitPt);
-
- virtual voidDrawGrid(void);
- virtual voidDrawItem(short theItem, Rect *theBox) {}
- virtual voidFindItemBox(short theItem, Rect *theBox);
- virtual voidSetGridOn(Boolean aGridOn) { gridOn = aGridOn; }
- };
-
- typedef struct { /* Resource template for a */
- short rows; /* character grid */
- short columns;
- short BoxWidth;
- short BoxHeight;
- } GridSelectorTemp, *GridSelectorTempP;
-
-
-
-
- class CCharGrid : public CGridSelector { /* Class Declaration*/
-
- protected:
-
- Handle theCharacters; /* Characters within the grid */
-
- public:
- /** Instance Methods **/
- ~CCharGrid(void) { DisposHandle(theCharacters); }
-
- CCharGrid( CView *anEnclosure, CBureaucrat *aSupervisor,
- short rows, short cols,
- short boxWidth, short boxHeight,
- SizingOption hSizing, SizingOption vSizing,
- short hLoc, short vLoc,
- short commandBase,
- short theSize,
- char *extra);
- CCharGrid(short ChGdid, CView *anEnclosure, CBureaucrat *aSupervisor)
- : CGridSelector('ChGd',ChGdid,anEnclosure,aSupervisor) {}
-
- voidIViewTemp(Ptr *viewData);
-
- voidDrawItem(short theItem, Rect *theBox);
- };
-
- typedef struct { /* Resource template for a */
- short rows; /* character grid */
- short cols;
- short boxWidth;
- short boxHeight;
- short hSizing;
- short vSizing;
- short hLoc;
- short vLoc;
- short commandBase;
- short theSize;
- char*extra;
- } CharGridTemp, *CharGridTempP;
-
-
-
-
- /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
- /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
- /*!!!!!!!!!!!!!!!!!!!!!!!!!!! THE PROBLEM !!!!!!!!!!!!!!!!!!!!!!!!!!!*/
- /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
- /*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
-
- void CCharGrid::IViewTemp(Ptr *viewData)
- {
- }
-
-
-
-
- End of CFront execution
-
- Apple 'C' compiler V3.1 (10/6/89 5:24:39 PM)
- (c) 1987-1989 Apple Computer, Inc.
-
- Compiling : ":C.pipe.code.c"
- __ct__13CGridSelectorFUlsP5CViewP11CBureaucrat
- Restore__12CEnvironmentFv
- UpdateMenus__11CBureaucratFv
- Dawdle__11CBureaucratFPl
- DoCommand__11CBureaucratFl
- DoKeyUp__11CBureaucratFcUcP11EventRecord
- DoAutoKey__11CBureaucratFcUcP11EventRecord
- DoKeyDown__11CBureaucratFcUcP11EventRecord
- Notify__11CBureaucratFP5CTask
- __dt__11CBureaucratFv
- EndTracking__10CMouseTaskFP5PointN21
- KeepTracking__10CMouseTaskFP5PointN21
- BeginTracking__10CMouseTaskFP5Point
- Redo__5CTaskFv
- Undo__5CTaskFv
- Do__5CTaskFv
- # Starting code generation...
- 274 __ct__13CGridSelectorFUlsP5CViewP11CBureaucrat
- 38 Restore__12CEnvironmentFv
- 84 UpdateMenus__11CBureaucratFv
- 36 Dawdle__11CBureaucratFPl
- 80 DoCommand__11CBureaucratFl
- 118 DoKeyUp__11CBureaucratFcUcP11EventRecord
- 120 DoAutoKey__11CBureaucratFcUcP11EventRecord
- 120 DoKeyDown__11CBureaucratFcUcP11EventRecord
- 88 Notify__11CBureaucratFP5CTask
- 84 __dt__11CBureaucratFv
- 48 EndTracking__10CMouseTaskFP5PointN21
- 50 KeepTracking__10CMouseTaskFP5PointN21
- 48 BeginTracking__10CMouseTaskFP5Point
- 50 Redo__5CTaskFv
- 26 Undo__5CTaskFv
- 24 Do__5CTaskFv
- # Total code size = 1288
-
-
-
- Frank Stock
- DSBB:Developers Ask Each Other:General Discussion
- 3/21/90
-
-